package com.dream.cgomall.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;


import java.io.Serializable;
import java.util.List;

/**
 * (CgoAdmin)表实体类
 *
 * @author makejava
 * @since 2021-07-01 18:02:52
 */
@SuppressWarnings("serial")
@Data
public class CgoAdmin implements Serializable {
    //用户id 自增
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    //头像
    private String avatar;
    //手机号
    private String phone;
    //用户姓名
    private String username;
    //用户密码
    private String password;
    //性别
    private String sex;
    //生日
    private LocalDate bornDate;
    //个性签名
    private String signature;
    //最后登录日期
    private Date lastLoginTime;
    //新添时间
    private Date addTime;
    //更新时间
    private Date updateTime;
    //删除情况
    private Integer delete;
    //权限
    private List<CgoRole> roleList;

    public CgoAdmin(String phone, String password) {
        this.phone = phone;
        this.password = password;
    }

    public CgoAdmin(Integer id, String avatar, String username, String signature) {
        this.id = id;
        this.avatar = avatar;
        this.username = username;
        this.signature = signature;
    }

    public CgoAdmin(Integer id, String phone, String username, String password, Integer delete) {
        this.id = id;
        this.phone = phone;
        this.username = username;
        this.password = password;
        this.delete = delete;
    }

    public List<CgoRole> getRoleList() {
        return roleList;
    }

    public CgoAdmin(String phone, String username, String password) {
        this.phone = phone;
        this.username = username;
        this.password = password;
    }

    public CgoAdmin() {
    }

    public CgoAdmin(Integer id, String avatar, String phone, String username, String password, String sex, LocalDate bornDate, String signature, Date lastLoginTime, Date addTime, Date updateTime, Integer delete, List<CgoRole> roleList) {
        this.id = id;
        this.avatar = avatar;
        this.phone = phone;
        this.username = username;
        this.password = password;
        this.sex = sex;
        this.bornDate = bornDate;
        this.signature = signature;
        this.lastLoginTime = lastLoginTime;
        this.addTime = addTime;
        this.updateTime = updateTime;
        this.delete = delete;
        this.roleList = roleList;
    }
}
